/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package xmarti.vacaxm.client.maintenance.auxiliar;

import xmarti.vacaxm.utils.TDSLanguageUtils;
import xmarti.vacaxm.utils.ValidarText;

/**
 *
 * @author xmarti
 */
public class JPAuxiliarData1 extends javax.swing.JPanel {

    /**
     * Creates new form JPStateData
     */
    public JPAuxiliarData1(boolean  codeNumeric) {
        initComponents();        
        this.jTextCode.setDocument(new ValidarText(3,codeNumeric));       
    }
    public String getCodeAuxiliar(){
        return this.jTextCode.getText();        
    }
    public void setCodeAuxiliar(String code){
        this.jTextCode.setText(code);        
    }
    public String getNameAuxiliar (){
        return this.jTextName.getText();
    }
    public void setNameAuxiliar(String name){
        this.jTextName.setText(name);
    }
   
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabelCaptionName = new javax.swing.JLabel();
        jTextCode = new javax.swing.JTextField();
        jLabelDescription = new javax.swing.JLabel();
        jTextName = new javax.swing.JTextField();

        jLabelCaptionName.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabelCaptionName.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabelCaptionName.setText(TDSLanguageUtils.getMessage("jPanelAuxiliar.JLabel.code.caption"));

        jTextCode.setBackground(new java.awt.Color(255, 255, 204));
        jTextCode.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jTextCode.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jTextCode.setAlignmentX(0.0F);
        jTextCode.setAlignmentY(0.0F);

        jLabelDescription.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabelDescription.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabelDescription.setText(TDSLanguageUtils.getMessage("jPanelAuxiliar.JLabel.name.caption"));

        jTextName.setBackground(new java.awt.Color(255, 255, 204));
        jTextName.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jTextName.setHorizontalAlignment(javax.swing.JTextField.LEFT);
        jTextName.setAlignmentX(0.0F);
        jTextName.setAlignmentY(0.0F);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabelCaptionName, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(jTextCode, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabelDescription, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(jTextName, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)))
                .addGap(137, 137, 137))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(jLabelCaptionName, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jTextCode, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(6, 6, 6)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addComponent(jLabelDescription, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jTextName, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(26, 26, 26))
        );
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabelCaptionName;
    private javax.swing.JLabel jLabelDescription;
    private javax.swing.JTextField jTextCode;
    private javax.swing.JTextField jTextName;
    // End of variables declaration//GEN-END:variables
}
